package com.dianxin.secure.persist;

import java.io.IOException;
import java.util.Set;

import com.dianxin.secure.model.Secure;

public interface RedisDaoInterface<T extends Secure> {

	
	public  int getNumber();

	
	public  Set<String> get(int pageNumber, int pageSize);

	
	public  Set<T> getByPath(final String path) throws IOException,
			InstantiationException, IllegalAccessException;

	
	public  Set<T> getByName(final String name) throws IOException,
			InstantiationException, IllegalAccessException;

	
	public  T getByNameAndPath(final String name, final String path)
			throws IOException, InstantiationException, IllegalAccessException;

	
	public  void save(final T secure) throws IOException;

	
	public  void saveSecureKey(final T secure) throws IOException;

	
	public  void saveFileKey(final T secure) throws IOException;

	
	public  void saveFileKey(final String key, final String value);

	
	public  void saveFileKey(final String key, final Secure secure)
			throws IOException;

	
	public  void update(final T oldSecure, final T newSecure)
			throws IOException, InstantiationException, IllegalAccessException;

	
	public  T delete(T secure) throws IOException,
			InstantiationException, IllegalAccessException;

	
	public  void deleteSecureKey(T secure) throws IOException;

	
	public  void deleteFileKey(T secure) throws IOException;

	
	public  void deleteKey(final String key, final String value);

	
	public  void deleteKey(final String key, final Secure secure)
			throws IOException;

	


	Set<T> getPage(String name, int pageNumber, int pageSize);


	int getNumberByName(String name);

}